<?php if ($this->pages->pageCount > 1): ?>
<div class="span9">
    <div class="pagination">
        <ul>
            <li class="<?php echo $this->pageNumber == 1 ? 'disabled' : '' ?>">
                <a href="<?php echo $this->url ?>?page=<?php echo $this->pageNumber - 1 ?>">Prev</a>
            </li>
            <?php for ($i = 1; $i <= $this->pages->pageCount; $i++): ?>
                <li class="<?php echo $i == $this->pageNumber ? 'active' : '' ?>">
                    <a href="<?php echo $this->url ?>?page=<?php echo $i ?>"><?php echo $i ?></a>
                </li>
            <?php endfor ?>
            <li class="<?php echo $this->pageNumber == $this->pages->pageCount ? 'disabled' : '' ?>">
                <a href="<?php echo $this->url ?>?page=<?php echo $this->pageNumber + 1 ?>">Next</a>
            </li>
        </ul>
    </div>
</div>
<?php endif ?>